package com.qishi.exampleFour;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestDynamicAdvisor {

    public static void main(String[] args) {
        String configPath = "example4-3.xml";
        ApplicationContext ctx = new ClassPathXmlApplicationContext(configPath);
        Waiter waiter = (Waiter)ctx.getBean("waiter2");


        waiter.serviceTo("Peter");
        waiter.greetTo("Peter");

        waiter.serviceTo("John");
        waiter.greetTo("John");//特殊客户John
    }
}
